package com.yq.chaos.base.ui.status;

import com.yq.chaos.base.ui.widget.LoadingLayout;

/**
 * 初始化UI管理类
 */

public class LoadingLayoutManager {
    private LoadingLayout loadingLayout;



    public void loadStatu(int type){
        if (type == StatusType.CONTENT.getType()) {
          if (null!=loadingLayout){
              loadingLayout.showContent();
          }
        }else if (type == StatusType.LOADING.getType()){
            if (null!=loadingLayout){
                loadingLayout.showLoading();
            }
        }else if (type == StatusType.EMPTY.getType()){
            if (null!=loadingLayout){
                loadingLayout.showEmpty();
            }
        }else if (type == StatusType.NETWORK_ERROR.getType()){
            if (null!=loadingLayout){
                loadingLayout.showNetworkErrorView();
            }
        }else if (type == StatusType.OTHER_ERROR.getType()){
            if (null!=loadingLayout){
                loadingLayout.showOtherErrorView();
            }
        }
    }
}
